Copyright: Copyright © 1992-1994 Mike Chapman
Citation: Copyright © 1992-1994 Mike Chapman, TechDesign


SETUP.EXE Help
Version 3.5

Alternative Visual Basic Setup Bootstrap Program

Copyright © 1992-1994 Mike Chapman, TechDesign

All Rights Reserved

SETUP.EXE 3.5 is freeware. Feel free to use this program when distributing your applications - that's what is was written for after all. The usual stuff about "no warranty is expressed or implied" should be observed however. If you want to pass on SETUP.EXE except as the bootstrap for an application then you must make sure all the original files are included.

Help File Build 3.5   26 April 1994


 SETUP.EXE 3.5 Distribution Files

See Also

The following files should have been included in the distribution archive you recieved SETUP.EXE 3.5 in. If you pass on SETUP.EXE except as a bootstrap for an application then you must include all of these files in their original forms.

 SETUP.EXE

The bootstrap program.

 SETUPEXE.HLP

This help file.

 SETUP.INF

An example INF file.

 README.TXT

General product notes.

 HDKCTNTS.DLL

Support file required to use this help file.


AlsoDist

See Also

Product Support and Contact Information


 Reference

 Differences from the Microsoft-supplied version

 Compatibility with SetupWizard

 SETUP.EXE 3.5 features

 Change History


 Use

 How to use SETUP.EXE 3.5

 SETUP.INF file


 What is SETUP.EXE used for ?

SETUP.EXE is the program which the user runs to install your application. It pre-installs specific files which are used by the main Setup program which performs the actual application installation. Once these files are installed it will run the main Setup program. It is sometimes referred to as a bootstrap program.

Your main Setup program (normally called SETUP1.EXE) which provides the user with a nice friendly interface when installing your application (asks where to install the application on the user's hard disk, progress meters, configuration options, etc.) will be written in Visual Basic and in order to run will require some DLLs to be available (notably VBRUNx00.DLL and possibly SETUPKIT.DLL, VER.DLL and DDEML.DLL plus any VBXs it may use).

If your main Setup program is run off the floppy disk all these files have to be present on it or somewhere in the user's Path (e.g. hard disk). If these files are not available from the Path then they must be on the floppy and then if Windows is still running when the installation is finished and the user removes the floppy disk the next Visual Basic application to run might think the DLLs it needs are on that floppy drive and Windows will put up an error message even though the DLL is in the System directory.

The other issue is that all these DLLs waste a lot of disk space (some 450k at least) when stored in a usable form on the floppy disk. If they were compressed you could fit that much more of your application on it instead. Of course, if they are compressed you can't run your main Visual Basic Setup program using them.

The third point is that the installation process will run a lot slower from the floppy disk instead of the hard disk. However, this won't be such an issue if you are installing the application from a Network drive.

Hence a bootstrap program to copy (and optionally decompress) the files required for the installation process to the user's hard disk.


 Product Support and Contact Information

If you have any problems using SETUP.EXE 3.5, or encounter problems which you believe may be software bugs, please contact me and I will do my best to assist you in solving the problem.

Feedback and suggestions are very welcome - most of the features in this latest release are requests. Your contributions to SETUP.EXE's evolution will help ensure it meets your needs in the future.

	Mike Chapman, TechDesign, 27 Gorse Drive, Smallfield, Surrey, RH6 9GJ, England.
	CompuServe: 100030,351 Internet: 100030.351@compuserve.com
Email is the preferred method of contact.


 Differences from the Microsoft-supplied version

See Also

A SETUP.EXE is provided with Visual Basic in the KITFILES subdirectory but it differs from this alternative SETUP.EXE in a number of significant areas.

There have been a number of updates to the Microsoft-supplied SETUP.EXE (the update can be obtained from Microsoft and downloaded from CompuServe) and the latest version that was used for this comparison was 1.00.004 and dated 23 Aug 1993.

Microsoft-supplied	SETUP.EXE 3.5
Requires that all Visual Basic programs running be closed before the Setup process can commence. Your users may not know which applications are Visual Basic or not and may not want or be able to close them down anyway - they may even be running a VB frontend ! This is also of no use if you wish to call the Setup process from a VB application.	No restriction imposed.
Requires VER.DLL to be stored on the disk and in an uncompressed form or no installation will take place.	SETUP.EXE does not require VER.DLL for it to install the files. You only need to specify it if your Visual Basic Setup program SETUP1.EXE uses it to install files (which is likely).  All files (including VER.DLL) can be compressed.
Requires the more advanced version of LZEXPAND.DLL to be present on the user's hard disk. This file existed in an early form on Windows 3.0 machines and isn't compatible with this SETUP.EXE.	Works with the original Windows 3.0 LZEXPAND.DLL.
	Developer-customisable Setup dialogue box title, messages, size, background colour, and style.
If there is not enough space on the user's hard disk to copy the pre-install files an error message is displayed informing the user that it could not copy a particular file.	If there is not enough space on the user's hard disk an error message is displayed informing the user of this fact and pointing out the disk space required.
	Developer-customisable error messages so that, for example, you can inform the user of specific support procedures.
Requires your Visual Basic Setup program SETUP1.EXE to be stored on the distribution disks with that name.	The Setup program can be stored with any name.
Will copy all files regardless of whether they are already on the user's hard disk although version checking is performed.	Will not copy a file if it already exists. However, no real version checking is performed.
Requires that any files that are compressed must be compressed with the -r switch to store the uncompressed file name.	No such requirement.
SETUP.EXE size: 19k	SETUP.EXE size: approx. 12k


 SETUP.EXE 3.5 features

See Also

It has a developer-customisable Setup dialogue box with the following definable features:

 title,

 up to four horizontally centralised messages at specific vertical positions,

 border style of fixed single with caption or fixed double with no caption,

 height and width,

 back colour of white or grey.

Any number of pre-install files may be specified.

All pre-install files may be compressed with COMPRESS.EXE.

Optionally store the main Visual Basic Setup program (SETUP1.EXE) on the distribution disk with a developer-specified file name and also copy it to the user's Windows directory with a different name.

Allows installation to proceed with other Visual Basic programs running.

Notifies user if there is not enough space on hard disk to copy pre-install files.

Will not copy files that already exist on the user's hard disk. No version checking is carried out yet. You can also force files to be copied regardless. VER.DLL is not required.

When installing to a network workstation it will copy the pre-install files to the user's Windows directory instead of the networked System directory.

It is only approx. 12k in size.

Works with Visual Basic 1,2 and 3 and Windows 3.x and Windows for Workgroups 3.1x.


AlsoFeatures

See Also

Differences from the Microsoft-supplied version

Compatibility with SetupWizard


 Change History

Portions of this product were provided by Bob Feller.

Version 1.0	15 Jul 1992

First public release.

Version 1.01	1 Aug 1992

Pass install path to VB Setup program.

Version 2.0	5 Feb 1993

Centralise Setup dialogue box.

Change to copy VBRUN200.DLL instead of 100 and also copy DDEML.DLL.

Version 3.0	28 Aug 1993

Use INF file for customisable Setup dialogue box title, message and size. Pre-installs any number of files and checks for required disk space. Is thus VB version independent.

Version 3.0.1	27 Oct 1993

Fix to allow it to run on Windows 3.0 machines.

Fix to allow it to correctly calculate the free disk space when Windows is launched from DOS in the style of "c:\windows\win".

Version 3.5	26 Apr 1994

INF file settings to specify up to 4 message lines which are automatically centred but have user-defined vertical positioning.

Settings to specify border style and back colour of the dialogue.

Developer-defined error message text for different errors.

Setting to specify different file name for SETUP1.EXE on the distribution disk.

You can now force a file to be installed but it still doesn't perform any real version checking yet.

Version information for SETUP.EXE added along with an icon.

Improved help file with contents outline.

Minor changes to some message text.


 How to use SETUP.EXE 3.5

1. Determine which DLLs your Visual Basic setup program (SETUP1.EXE) requires to run. This is likely to include VBRUNx00.DLL, SETUPKIT.DLL, VER.DLL and possibly DDEML.DLL. It may also include some VBXs like THREED.VBX and, if you have created one, your Setup help file.

2. As specified in the Visual Basic 3.0 on-line help (search on Setup Toolkit ) create your distribution disk. Other versions of VB describe the Setup Toolkit elsewhere. Note that with SETUP.EXE 3.5 you do not need to compress files with the -r parameter. Note also its compatibility with the VB 3.0 SetupWizard.

3. Code the required settings in the SETUP.INF text file.

4. Copy SETUP.EXE and SETUP.INF to your distribution disk.


 Compatibility with SetupWizard

See Also

SETUP.EXE 3.5 is not automatically compatible with the Visual Basic 3.0 SetupWizard. To make use of it, each time you create distribution disks you will have to:

1. Run the SetupWizard as normal and create a distribution disk.

2. Examine the SETUP.LST file on the distribution disk.

3. The first file listed is the name of the main Setup program to be run. Code this file in the SETUP.INF SetupFileName entry.

3. All the other files listed are the pre-installation files. For each one code a Filen entry in the SETUP.INF.

5. Delete the SETUP.LST file from the distribution disk.

6. Copy the SETUP.INF files to the distribution disk.

To get this version of SETUP.EXE to be automatically copied to the distribution disks change the SETUPWIZ.INI file:

[SETUPWIZ]

BOOTSTRAP=setup.exe location

Where setup.exe location is the fully-qualified path and file name of SETUP.EXE 3.5. This change is only necessary once.


AlsoDiff
See Also

Compatibility with SetupWizard

SETUP.EXE 3.5 features


AlsoComp
See Also

SETUP.INF file


 SETUP.INF file

Example

SETUP.INF is a text file that lists all the files which SETUP.EXE 3.5 pre-installs on the user's machine. It also contains various optional configuration settings for the initial Setup dialogue box and the amount of space the pre-install files require.

All the following SETUP.EXE settings appear under the [BootSetup] section heading:

DialogTitle=

DialogMessagen=

DialogWidth=

DialogHeight=

DialogColor=

DialogStyle=

SetupFileName=

SetupDistName=

ErrorMessageInstall=

ErrorMessageFreeSpace=

ErrorMessageLaunch=

FreeSpace=

Filen=

The SETUP.INF file name was chosen because most commercial Setup programs seem to use this name as a standard and if your main Visual Basic Setup program (SETUP1.EXE) reads settings to determine what files the actual application requires to be installed then it makes sense to use only one file.


ExampleSETUP.INF
SETUP.INF example

[BootSetup]

DialogTitle=Loan Application Setup

DialogMessage1=Please wait...;20

DialogMessage2=Initialising Setup;40

DialogWidth=300

DialogHeight=150

DialogColor=0

DialogStyle=0

SetupFileName=SETLOAN.EXE

SetupDistName=SETLOAN.EX_

ErrorMessageInstall=

ErrorMessageFreeSpace=

ErrorMessageLaunch=

FreeSpace=472832

File1=VBRUN300.DLL

File2=SETUPKIT.DLL

File3=DDEML.DLL

File4=VER.DLL;1


 ErrorMessageLaunch setting

See Also

If SETUP.EXE is unable to run the VB Setup program (SETUP1.EXE) that is has just installed then the following message will be displayed and the installation will stop::

The Installation Aborted text can be customised to include your own specific product support / instruction details as follows:

[BootSetup]

ErrorMessageLaunch=error message

The error message can be any characters you like and up to 160 characters in length. It will completely replace the Installation Aborted line.


AlsoErrorLaunch

See Also

SETUP.INF file

SetupFileName setting

SetupDistName setting

ErrorMessageInstall setting

ErrorMessageFreeSpace setting


 ErrorMessageFreeSpace setting

See Also

If you have specified the FreeSpace setting and there is not enough disk space then the following message is displayed and the installation process will stop:

The Installation Aborted text can be customised to include your own specific product support / instruction details as follows:

[BootSetup]

ErrorMessageFreeSpace=error message

The error message can be any characters you like and up to 160 characters in length. It will completely replace the Installation Aborted line.


AlsoErrorSpace

See Also

SETUP.INF file

SetupFileName setting

Filen setting

ErrorMessageInstall setting

ErrorMessageLaunch setting


 ErrorMessageInstall setting

See Also

If a file cannot be found on the distribution disk or SETUP.EXE has a problem copying it then the following message will be displayed and the installation process will stop:

The Installation Aborted text can be customised to include your own specific product support / instruction details as follows:

[BootSetup]

ErrorMessageInstall=error message

The error message can be any characters you like and up to 160 characters in length. It will completely replace the Installation Aborted line.


AlsoErrorInstall

See Also

SETUP.INF file

SetupFileName setting

Filen setting

ErrorMessageFreeSpace setting

ErrorMessageLaunch setting


 SetupDistName setting

See Also

The SetupDistName setting specifies the name of the main Visual Basic Setup program (SETUP1.EXE) as it is stored on the distribution disk. It is an optional setting and is coded in the SETUP.INF file as follows:

[BootSetup]

SetupDistName=name

The name has to be exactly as the file is stored on the disk but with no path, e.g. LOANSTP.EX_. If this setting is not specified then SETUP1.EX_ will be used instead.

The file does not have to be compressed. If you do compress it then you must use the COMPRESS.EXE program supplied with Visual Basic. You do not have to use the -r parameter though.

You do not have to specify an underscore ( _ ) at the end of the extension but your file can still be compressed if you wish. SETUP.EXE will not care.

Note: If SETUP.EXE cannot find the above file on the distribution disk or it has a problem copying it then the following message will be displayed and the installation process will stop:

The Installation Aborted text can be customised using the ErrorMessageInstall setting.

This file will be copied into the Windows directory even if another file of that name exists. In that case the existing one would be overwritten.


AlsoSetupDist

See Also

SETUP.INF file

SetupFileName setting

ErrorMessageInstall setting


 DialogStyle setting

See Also

The Setup dialogue box border style can be customised.

The style can be either single border with caption (title bar):

Or a double border with no caption:

[BootSetup]

DialogStyle=value

Where Value is 0 for single border with caption (which is the default) or 1 for double border and no caption.

You can customise the message displayed using the DialogMessagen settings.


AlsoDialogStyle

See Also

SETUP.INF file

DialogTitle setting

DialogColor setting

DialogMessagen setting


 DialogColor setting

See Also

The Setup dialogue box background colour can be partially customised.

It can be set to either white [image] or grey [image] .

[BootSetup]

DialogColor=value

Where Value is 0 for white (which is the default) or 1 for grey.


AlsoDialogColor

See Also

SETUP.INF file

DialogStyle setting


 DialogTitle setting

See Also

The title bar text of the Setup dialogue box can be customised.

To specify the title bar text code the following setting in the SETUP.INF file:

[BootSetup]

DialogTitle=text

Text can be any characters you like and up to 80 characters in length. If no DialogTitle setting is specified then the default text used will be Setup.

You may find you need to increase the width of the dialogue box using the DialogWidth setting from its default if you want a particularly long title. You can skip display of a title by changing the DialogStyle setting.


AlsoDialogTitle
See Also

SETUP.INF file

DialogWidth setting

DialogStyle setting


 DialogMessagen setting

See Also

You can specify up to four different lines of text to be displayed in the Setup dialogue box.

To specify the message text code the following settings in the SETUP.INF file:

[BootSetup]

DialogMessagen=text ; position

DialogMessagen=text ; position

etc...

Where n is the number of the DialogMessagen setting, e.g. DialogMessage1, then DialogMessage2, etc. up to a maximum of 4. Text can be any characters you like and up to 60 characters in length. Position is the vertical position that Text will start at within the dialogue box and is measured in pixels.

Text and Position must be separated by a semi-colon ( ; ) and that character cannot then be used in the actual message.

If no DialogMessagen settings are specified then the default text used will be Initializing Setup... at a vertical position of 30.

The messages are horizontally centralised and you may find you need to increase the width of the dialogue box using the DialogWidth setting from its default if you want a particularly long message.


 DialogWidth setting

See Also

The width of the Setup dialogue box can be customised.

To specify a width code the following setting in the SETUP.INF file:

[BootSetup]

DialogWidth=width

The width is measured in pixels. If no DialogWidth setting is specified then the default width is 200 pixels.


AlsoDialogWidth
See Also

SETUP.INF file

DialogHeight setting


 DialogHeight setting

See Also

The height of the Setup dialogue box can be customised.

To specify a height code the following setting in the SETUP.INF file:

[BootSetup]

DialogHeight=height

The height is measured in pixels. If no DialogHeight setting is specified then the default height is 100 pixels.


 SetupFileName setting

See Also

The SetupFileName setting specifies the name to rename the main Visual Basic Setup program (SETUP1.EXE) to when it is copied to the user's Windows directory. It is an optional setting and is coded in the SETUP.INF file as follows:

[BootSetup]

SetupFileName=name

The name has to have the file extension specified but no path, e.g. LOANSTP.EXE. If this setting is not specified then SETUP1.EXE will be used instead.

SETUP1.EXE must be stored on the distribution disk as SETUP1.EX_ (an underscore as the last character of the extension) unless you specify a different name in the SetupDistName setting.

Note: If SETUP.EXE cannot find SETUP1.EX_ (or the SetupDistName specified one) on the distribution disk or it has a problem copying it then the following message will be displayed and the installation process will stop:

The Installation Aborted text can be customised using the ErrorMessageInstall setting.

This file will be copied into the Windows directory even if another file of that name exists. In that case the existing one would be overwritten.


AlsoDialogSetup
See Also

SETUP.INF file

FreeSpace setting

Filen setting

SetupDistName setting

ErrorMessageInstall setting


SETUP1.EXE

SETUP1.EXE

SETUP1.EXE is your Visual Basic Setup program which actually performs the task of installing your application onto the user's machine. This file is copied to the user's machine by SETUP.EXE. It does not have to be copied as SETUP1.EXE or stored on the distribution disk with that name either; specify the SetupFileName and SetupDistName settings as required.


 FreeSpace setting

See Also

The FreeSpace setting specifies the amount of disk space required to copy the pre-install files to the user's hard disk. It is an optional setting and is coded in the SETUP.INF file as follows:

[BootSetup]

FreeSpace=bytes

The number of bytes all the pre-install files (all those files specified by the Filen= settings) as well as the main Visual Basic Setup program (SETUP1.EXE) take up uncompressed must be specified.

When SETUP.EXE comes to copy the pre-install files it checks to see if these files already exist on the user's hard disk. If they do then it takes away the size of these files from the specified bytes required above to come to an accurate figure of what is required.

If there is not enough space then the following message is displayed:

The Installation Aborted text can be customised using the ErrorMessageFreeSpace setting.

If this setting is not specified and the user does not have enough hard disk space to install the pre-install files then SETUP.EXE will halt with an "Unexpected Error" message when the disk space is exhausted. It may also leave partially copied files on the user's machine too. We strongly suggest you to code this setting to avoid this occurring.

Note: SETUP.EXE does not perform any version checking on the files to be installed. It only checks to see if it exists. This is slated for a future release.


AlsoDialogFree
See Also

SETUP.INF file

SetupFileName setting

Filen setting

ErrorMessageFreeSpace setting


 Filen setting

See Also

The Filen setting specifies the name of a pre-install file to copy to the user's hard disk before the main Visual Basic Setup program (SETUP1.EXE) is run. Any DLLs or VBXs which your Setup program uses must be specified. You can have any number of these settings and they are coded in the SETUP.INF file as follows:

[BootSetup]

Filen=name

Filen=name

etc...

Where n is the number of the Filen setting, e.g. File1, then File2, File3, etc. The name has to have the file extension specified but no path, e.g. VBRUN300.DLL.

SETUP.EXE does not perform any version checking on the files to be installed. It only checks to see if it exists. This is slated for a future release.

You can specify a further argument on each Filen setting to force that file to be copied to the user's machine whether it exists or not. We recommend you use this feature with restraint.

[BootSetup]

Filen=name ; overwrite

Where Overwrite is 0 if that file should not be copied if it already exists (this is the default) or 1 if that file is to be copied regardless.

The actual file must be stored on the distribution disk with the last character of the extension as an underscore ( _ ), e.g. VBRUN300.DL_. Remember that the Filen setting has to have the full name (without the underscore).

Note: The file does not have to be compressed. If you do not compress the file it must still have the last character of the extension as an underscore (_).

If you do compress the files then you must use the COMPRESS.EXE program supplied with Visual Basic. You do not have to use the -r parameter though.

If a file is specified which SETUP.EXE cannot find it on the distribution disk or has a problem copying it then the following message will be displayed noting the problem file and the installation process will stop:

The Installation Aborted text can be customised using the ErrorMessageInstall setting.


AlsoDialogFile
See Also

SETUP.INF file

SetupFileName setting

FreeSpace setting